package com.his.his_system.controller.VisitController;

import com.his.his_system.common.util.ResultAdvice;
import com.his.his_system.service.DefaultService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 就诊列表
 * @author 余襄元
 */
@RestController
@RequestMapping("/his/sad/visitslist")
public class VisitsListController {

    @Resource
    private DefaultService defaultService;


    /**
     * 模糊查询
     */
    @GetMapping("getPatientbynameAndguahaodate")
    public ResultAdvice getPatientbynameAndguahaodate(String name, String php, Integer i){
        return ResultAdvice.success(defaultService.getAllVisit(i,name,php,null),"成功");
    }

    /**
     * 获取未就诊患者列表
     * @return
     */
    @GetMapping("getAllRegister")
    public ResultAdvice getAllRegister(Integer i){
        return ResultAdvice.success(defaultService.getAllVisit(i,null,null,null),"成功");
    };

    /**
     * 获取已就诊列表
     * @param name
     * @param php
     * @return
     */
    @GetMapping("getAllyiRegister")
    public ResultAdvice getAllyiRegister( String name, String php){
        return ResultAdvice.success(defaultService.getAllyiRegister(name,php),"成功");
    }
}
